package com.ruoyi.project.WebMoudle.WxShop.mapper;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.ruoyi.project.WebMoudle.ShopSuser.domain.ShopVo;
import com.ruoyi.project.WebMoudle.WxShop.domain.QueryShop;
import com.ruoyi.project.WebMoudle.WxShop.domain.ShopEntity;
import com.ruoyi.project.WebMoudle.WxShop.domain.WxShop;
import com.ruoyi.project.WebMoudle.advShow.domain.AdvDistance;
import com.ruoyi.project.WebMoudle.advShow.domain.SearchShop;
import org.apache.ibatis.annotations.Param;

/**
 * 商家店铺Mapper接口
 * 
 * @author ruoyi
 * @date 2020-06-18
 */
public interface WxShopMapper 
{
    /**
     * 查询商家店铺
     * 
     * @param id 商家店铺ID
     * @return 商家店铺
     */
    public WxShop selectWxShopById(Long id);

    /**
     * 查询商家店铺列表
     * 
     * @param wxShop 商家店铺
     * @return 商家店铺集合
     */
    public List<WxShop> selectWxShopList(WxShop wxShop);

    /**
     * 查询待审核和审核失效的商铺
     * @param valids
     * @return
     */
    List<WxShop> selectWxShopList02();

    /**
     * 新增商家店铺
     * 
     * @param wxShop 商家店铺
     * @return 结果
     */
    public int insertWxShop(WxShop wxShop);

    /**
     * 修改商家店铺
     * 
     * @param wxShop 商家店铺
     * @return 结果
     */
    public int updateWxShop(WxShop wxShop);

    /**
     * 删除商家店铺
     * 
     * @param id 商家店铺ID
     * @return 结果
     */
    public int deleteWxShopById(Long id);

    /**
     * 批量删除商家店铺
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteWxShopByIds(String[] ids);

    //根绝类别id查询该类别下的商铺
    List<ShopEntity> selectShopsByType(Long id);

    //按照分类查询所有的商铺
//    Map<String,List<ShopEntity>> selectShopsGroup();

    //更新审核状态
    int updateValid(@Param("id") Long id, @Param("isValid")String isValid);

    List<AdvDistance> querySomeShop(QueryShop queryShop);

    List<AdvDistance> queryHotShopList(QueryShop queryShop);
    /*<!--定时修改让利比-->*/
    int updateDiscountRatio();

    int toShop(@Param("id") Long id, @Param("isValid")String isValid,@Param("shopCompany") String shopCompany);

    List<WxShop> searchShopList(SearchShop ssp);

    List<WxShop> offList(WxShop wxShop);

    ShopEntity queryByShopCompany(@Param("shopCompany")String shopCompany, @Param("status")String status);

    ShopVo selectApplyShop(Long wxUserId);

    int updateMoney(@Param("shopId")Long shopId, @Param("belongShop$")BigDecimal belongShop$);

    String queryShopMoneySum();

    int updateShopImg(@Param("id")Long id, @Param("pathFileName")String pathFileName);

    int queryApplyShopCount();

    WxShop selecShopMoneyById(Long shopId);

    List<WxShop> isShowList(WxShop wxShop);
}
